# import pygame and python modules
import pygame, os.path
from pygame.locals import *

# main sound class
class SoundHandler(object):
    def __init__(self):
        "use to load sound files"
        
    def play(self): pass
    
    def load_sound(self, file):
        "loads sound, suppy sound file name"
        if not pygame.mixer: return self.play()
        self.name = os.path.join('Data', file)
        try:
            self.sound = pygame.mixer.Sound(self.name)
            return self.sound
        except pygame.error('loading problem'):
            print('Warning, unable to load sound, ', self.name)
        return self.play()
    
